import request from "@/request";
import {POST} from "@/constant";

export const getProject = (data) => {
    return request({
        url: "/xiangmu/userxiangmulist",
        data,
        method: POST,
    });
};
// cxx
export const getProjectlist = (data) => {
    return request({
        url: "/xiangmu/searchxiangmu",
        data,
        method: POST,
    });
};

export const getProjectlists = (data) => {
    return request({
        url: "/xiangmu/searchyewuxiangmu",
        data,
        method: POST,
    });
};

export const subProject = (data) => {
    return request({
        url: "/xiangmu/addxiangmu",
        data,
        method: POST,
    });
};
export const myProject = (data) => {
    return request({
        url: "/xiangmu/xiangmubyuser",
        data,
        method: POST,
    });
};

//添加项目
export const addProject = (data) => {
    return request({
        url: "/xiangmu/addxiangmu",
        method: POST,
        data,
    })
}
// 业务添加项目
export const addProjectBus = (data) => {
    return request({
        url: "/yewuxiangmu/addxiangmu",
        method: POST,
        data,
    })
}

// 编辑项目

export const editProject = (data) => {
    return request({
        url: '/xiangmu/editxiangmu',
        method: POST,
        data
    })
}

// 删除项目

export const removeProject = (data) => {
    return request({
        url: '/xiangmu/delxiangmu',
        data,
        method: POST,
    })
}
// 延期项目
export const getPostpone = (data) => {
    return request({
        url: '/xiangmu/yanqixiangmulist',
        method: POST,
        data,
    })
}
// 项目详情
export const projectDetail = (data) => {
    return request({
        url: '/xiangmu/xiangmudetail',
        data,
        method: POST,
    })
}

// 分配人员

export function allotUser(data) {
    return request({
        url: '/xiangmu/fenpeiuser',
        method: POST,
        data
    })
}

// 结算项目

export function submitProject(data) {
    return request({
        url: '/xiangmuprice/querenjiesuan',
        method: POST,
        data
    })
}

// 删除项目人员
export const deleteJobUser = (data) => {
    return request({
        url: "/xiangmu/delxiangmuuser",
        data,
        method: POST,
    })
}

// 完成项目
export function okProject(data) {
    return request({
        url: '/xiangmu/querenwanchengrenwu',
        data,
        method: POST
    })
}

// 项目流程
export function xiangmuqueren(data) {
    return request({
        url: '/xiangmu/xiangmuqueren',
        data,
        method: POST
    })
}

// 小组项目
export function jishugroup(data) {
    return request({
        url: '/xiangmu/jishugroup',
        data,
        method: POST
    })
}

export function getProjectTypeEnum() {
    return request({
        url: '/xiangmu/getxiangmutype',
        method: POST,
    })
}

export function transferProjectType(data) {
    return request({
        url: '/xiangmu/editxiangmutype',
        data,
        method: POST,
    })
}


export function projectProgress(data) {
    return request({
        url: '/xiangmu/xiangmujindulist',
        data,
        method:POST,
    })
}


export  function getProjectHistoryList(data) {
    return request({
        url:'/xiangmu/xiangmuuserlist',
        data,
        method:POST,
    })
}
